﻿<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title></title>
    <script type="text/javascript">
        function firstM(callback) {
            setTimeout(function () {
                alert("first");
            }, 1000);
            
            callback("second");
        }

        function oneM() {
            setTimeout(function () {
                alert("first");
            }, 1000);
        }
        function secondM(param) {
            alert(param);
        }


        function clock() {
            var t = new Date();
            document.getElementById("clock").value = t;
        }

        var temp;
        function start() {
            temp= setInterval("clock()", 50);
        }

        start();
    </script>
</head>
<body>
    <input id="clock" name="clock" type="text" size="35"/>
    <input type="button" id="btnStop" onclick="temp=clearInterval(temp);" value="stop" />
</body>
</html>
